<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('消费记录列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 select-table table-striped">
                <form id="formId" th:object="${id}">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('ruoyi:detail:edit')}]];
        var removeFlag = [[${@permission.hasPermi('ruoyi:detail:remove')}]];
        var prefix = ctx + "ruoyi/detail";
        var id=[[*{id}]];
        $(function() {
            var options = {
                url: prefix + "/list",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "消费记录",
                method: 'post',
                sidePagination: "server",
                showFooter:true,
                showColumns: false,
                contentType: "application/x-www-form-urlencoded",
                queryParams: {
                    id:id
                },
                columns: [{
                    checkbox: false
                },
                {
                    field: 'id',
                    title: 'id',
                    visible: false
                },
                {
                    field: 'vipMoney',
                    title: '消费金额'
                },
                {
                    field: 'vipTime',
                    title: '消费时间'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>